<%-- 
    Document   : IndividualTeamEvaluation
    Created on : Jan 6, 2012, 11:47:31 PM
    Author     : Priyanka
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>


<br/>
<table>
    <tr>
        <td>
            <img src="<s:url value="/img/icons/certificate_new.png"/>"> 
        </td>
        <td>
            <span class="title">
                Evaluate students
            </span>
        </td>
    </tr>
</table>
<br/><br/> 

<s:form namespace="/evaluation" action="individualEvaluation">
    <table>
        <tr>
            <td colspan="2">
                <s:hidden key="modulecode"/>
                <b>Module:</b> <s:property value="modulecode"/>
            </td>
        </tr>
       
    </table>
            
         <s:iterator value="assessmentsResult">        

        <c:if test="${!empty assessmentsResult}">
            <table width="600" cellpadding="2" border="1">
                <tr style="background-color:#EEE;">
                    <th>AssessmentId</th>
                    <th>Title</th>
                    <th>Description</th>
                    <th>Type</th>
                    <th>Maximum Mark</th>
                    <th>Range</th>
                    <th>Owner</th>
                    <th>Teams</th>
                </tr>
                <tr style="background-color:#EEE;">
                    <td><s:property value="assessmentId"/></td>
                    <td><s:property value="title"/></td>
                    <td><s:property value="description"/></td>
                    <td><s:property value="type"/></td>
                    <td><s:property value="maximumMark"/></td>
                    <td><s:property value="fromRange"/>-<s:property value="toRange"/></td>
                    <td><s:property value="owner"/></td>
                    <td><s:property value="noOfTeams"/></td>
                </tr>
                <tr>
                    <td colspan="8">
 
                     
                         
                            <table width="500"  cellspacing="2">
                                <tr>
                                    <th>Assessment Item</th>
                                    <th>Description</th>
                                    <th>Weight</th>
                                    <th>Range</th>
                                    <th>Mark</th>
                                </tr>
                                <s:iterator value="assessmentItems" status="stat">
                                    <tr>
                                        <td><s:property value="assessmentItemId"/></td>
                                        <td><s:property value="description"/></td>
                                        <td><s:property value="weight"/></td>
                                        <td><s:property value="fromRange"/>-<s:property value="toRange"/></td>
                                        <td><s:property value="marks[#stat.index]"/></td>
                                        <s:hidden name="ids" value="%{assessmentId}_%{assessmentItemId}"/>
                                    </tr>
                                </s:iterator>
                            </table>

                    </td>
                </tr>
            </table> 
            <br/>
        </c:if>     
    </s:iterator>    
            
            
            
            
    <br/><br/>
   
   
</s:form>

<script type="text/javascript">
    
    $(function(){
        $( "#submit").button({icons: {primary:'ui-icon-disk'}});
    });
</script>